<!DOCTYPE html>
<%@page import="com.doeis.common.Constant"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><%=Constant.LOTTERY_PROJECT_TITLE%></title>
<%@include file="/WEB-INF/page/common/import.jsp"%>

<link rel="stylesheet" href="/static/css/login.css" />
</head>
<body>
	<div class="container">

		<form class="form-signin" action="/item/doAdd" method="post" onsubmit="return checkForm();">
			<input type="hidden" id="item_id" name="item_id" value="${param.item_id}">
			<h3 class="form-signin-heading">新建项目</h3>
			<input type="text" class="input-block-level" name="item_name" value="${item.item_name }" placeholder="项目名"> 
			<input type="text" class="input-block-level" name="item_description" value="${item.item_description }" placeholder="项目描述">
			<input type="password" class="input-block-level" name="password" value="${item.password }" placeholder="访问密码（可选，私密项目请设置密码）" >
			<button class="btn  btn-primary" type="submit">提交</button>
			<a href="javascript:history.go(-1)" class="btn">返回</a>
		</form>

	</div>
	<!-- /container -->
	
	<script type="text/javascript">
		function checkForm(){
			var item_name = $("input[name=item_name]").val();
			var item_description = $("input[name=item_description]").val();
			if(item_name==null||item_name.length==0){
				alert("项目名不要为空");
				return false;
			}
			if(item_description==null||item_description.length==0){
				alert("写点描述吧");
				return false;
			}
		}
	</script>
</body>
</html>